package dbutil;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import com.fjut.kms.tools.DBTools;

public class DBHelper extends JdbcParams {

	private static final String dburl = props.getProperty("dburl");//"jdbc:mysql://localhost:3306/gpdb?useUnicode=true&characterEncoding=UTF-8";
	private static final String userName = props.getProperty("userName");//"root";
	private static final String userPWD = props.getProperty("password");//"ecimcroot";
	private static Connection dbconn = null;

	/*static {
		try {
			Class.forName(props.getProperty("driverClass"));
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
	}*/

	public static Connection getConnection() throws SQLException {
		return DBTools.getConn();
		//if (dbconn == null) {
	//		dbconn = DriverManager.getConnection(dburl, userName, userPWD);
		 
	//		return dbconn;
	//	}

	//	return dbconn;
	}

	public DBHelper() {}
}